@extends('Home.home.layout')
@section('con')
	<div class="crumb">首页 &gt; 全站搜索</div>
	<form action="{{url('/home/home/search')}}" method="post">
            <div class="pageSearchBox">
                <input type="text" name="search" style="display:block;width:585px" maxlength="20" class="searchTxt" value="{{$name or 'ddd'}}" id="txtKeyword" onkeypress="enterKeyPress(event, btnSearch_Click)">
                <input type="button" onclick="$(this).parents('form').trigger('submit')" class="searchBtn" style="display:block;width:70px;height:40px;">
            </div>
        {{csrf_field()}}
    </form>
    <div class="main">

    @if(!empty($news))
		<div class="outer">
	        <div class="wrapHead rel">
	            <span class="f14 b ml15" id="spanTopicHead">找到  “<em style="color:red">{{$name}}</em>”  相关文章 {{$nnum}} 条</span>
	            <!-- <a class="more mr15" id="moreTopic" style="cursor:pointer">&gt;更多</a> -->
	        </div>
	        <div class="flName f14" id="divTopicCount">
	            <a href="javascript:void(0);" onclick="CataClick(this)" cataid="0">全部({{$nnum}})</a>
	        @foreach($num as $k => $v)
	            <a href="javascript:void(0);" onclick="CataClick(this)" cataid="0">{{$v -> name}}({{$v -> ff}})</a>
	        @endforeach
	        </div>
	        <ul class="articleList" id="ulTopicList">
	        @foreach($news as $nk => $nv)
	            <li>   <h2><a target="_blank" href="http://www.zyctd.com/zixun/201/260099.html"><span>2016.11.7重庆石柱<em style="color:red">黄连</em>行情</span></a></h2>   <p class="g6" style="display:inline-block;width:656px;clear:both;cursor: pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{$nv -> content}}</p>   <p class="g9"><span>{{$nv -> ctime}}</span></p></li>
	        @endforeach
	        </ul>
	    </div>
	@else
		<div class="outer">
            <div class="wrapHead rel">
                <span class="f14 b ml15" id="spanThreadHead">找到  “<em style="color:red">黄连</em>”  相关帖子 {{$pnum}} 条</span>
                <!-- <a class="more mr15" href="{{url('/home/home/news',['posts' => $name])}}" id="moreThread" style="cursor:pointer">&gt;更多</a> -->
            </div>
            <ul class="articleList" id="ulThreadList">
            @foreach($posts as $pk => $pv)
                <li>   <h2><a href="http://bbs.zyctd.com/thread-1038403-1-1.html" target="_blank"><span><em style="color:red">黄连</em></span></a></h2>   <p class="g6" style="display:inline-block;width:656px;clear:both;cursor: pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{$pv -> content}}</p>   <p class="g9"><span>{{$pv -> ctime}}</span></p></li>
            @endforeach
            </ul>
        </div>
	@endif
	</div>
    <div class="sideBar rightFg">   
        <div class="adArea">
            <a href="http://pubsvr.zyccst.com/statistics/pop.aspx?FromID=336&amp;url=http://chaoshi.zyccst.com/product/detail/12-773255-180570-170862" target="_blank">
                <img src="/bootcss/home/Images/9679ddef18394663a22929e7adf4a79e.jpg" alt="搜索页广告2" border="0">
            </a>
            <a href="http://pubsvr.zyccst.com/statistics/pop.aspx?FromID=337&amp;url=http://chaoshi.zyccst.com/product/detail/396-773255-165481-157658" target="_blank">
                <img src="/bootcss/home/Images/7fe4226acb4c47a5a0b544829163598f.jpg" alt="搜索页广告3" border="0">
            </a>
        </div>
    </div>
@endsection